CC=g++
CFLAGS=-g -c -Wall `sdl-config --cflags`
LDFLAGS=-lSDL -lSDL_image -lGL -lGLU
CPPFILES	?= $(wildcard *.cpp)


OBJECTS=$(CPPFILES:.cpp=.o)
EXECUTABLE=noxiis

all: $(CPPFILES) $(EXECUTABLE)
	
$(EXECUTABLE): $(OBJECTS) 
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@
